package org.way.iam.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.way.iam.dto.UserRolePermissionDto;
import org.way.iam.entity.SysRoleEntity;
import org.way.iam.mapper.SysRoleMapper;
import org.way.iam.mapper.SysUserRoleMapper;
import org.way.iam.service.ISysRoleService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysRoleService extends ServiceImpl<SysRoleMapper, SysRoleEntity> implements ISysRoleService {

    @Resource
    private SysUserRoleMapper userRoleMapper;

    @Override
    public List<UserRolePermissionDto> getRolePermission(String userId) {
        return this.getBaseMapper().getRolePermission(userId);
    }

    @Override
    public List<UserRolePermissionDto> getUserRole(String userId) {
        return this.getBaseMapper().getUserRole(userId);

    }
}
